<ul>
    <li><a href="<?php echo site_url('news')?>" <?if(isset($this->mnews)){echo 'class="select"';}?>>Tin tức</a></li>
    <?
     if(isset($this->mnews)) {
        for($i = 0; $i < count($this->mnews); $i++){
            $link = $this->mnews[$i]['link'];
            $name = $this->mnews[$i]['name'];
            echo '<li class="sub-menu"><a href="'.base_url().$link.'">'.$name.'</a></li>';
        }
     }
    ?>    
    <li><a href="<?php echo site_url('product')?>" <?if(isset($this->mshop)){echo 'class="select"';}?>>Gian hàng</a></li>
    <?
     if(isset($this->mshop)) {
        for($i = 0; $i < count($this->mshop); $i++){
            $link = $this->mshop[$i]['link'];
            $name = $this->mshop[$i]['name'];
            echo '<li class="sub-menu"><a href="'.base_url().$link.'">'.$name.'</a></li>';
        }
     }
    ?> 
    <li><a href="<?php echo site_url('diemthuong/cauhinh')?>" <?if(isset($this->mdiemthuong)){echo 'class="select"';}?>>Điểm thưởng</a></li>
    <?
     if(isset($this->mdiemthuong)) {
        for($i = 0; $i < count($this->mdiemthuong); $i++){
            $link = $this->mdiemthuong[$i]['link'];
            $name = $this->mdiemthuong[$i]['name'];
            echo '<li class="sub-menu"><a href="'.base_url().$link.'">'.$name.'</a></li>';
        }
     }
    ?>    
    <li><a href="<?php echo site_url('chonmua/listview')?>" <?if(isset($this->mnhommua)){echo 'class="select"';}?>>Nhóm mua</a></li>
    <?
     if(isset($this->mnhommua)) {
        for($i = 0; $i < count($this->mnhommua); $i++){
            $link = $this->mnhommua[$i]['link'];
            $name = $this->mnhommua[$i]['name'];
            echo '<li class="sub-menu"><a href="'.base_url().$link.'">'.$name.'</a></li>';
        }
     }
    ?> 
    <li><a href="<?php echo site_url('daugia/dangdienra')?>" <?if(isset($this->mdaugia)){echo 'class="select"';}?>>Đấu giá</a></li>
    <?
     if(isset($this->mdaugia)) {
        for($i = 0; $i < count($this->mdaugia); $i++){
            $link = $this->mdaugia[$i]['link'];
            $name = $this->mdaugia[$i]['name'];
            echo '<li class="sub-menu"><a href="'.base_url().$link.'">'.$name.'</a></li>';
        }
     }
    ?> 
    <li><a href="<?php echo site_url('guide')?>" <?if(isset($this->mhuongdan)){echo 'class="select"';}?>>Hướng dẫn</a></li>  
    <?
     if(isset($this->mhuongdan)) {
        for($i = 0; $i < count($this->mhuongdan); $i++){
            $link = $this->mhuongdan[$i]['link'];
            $name = $this->mhuongdan[$i]['name'];
            echo '<li class="sub-menu"><a href="'.base_url().$link.'">'.$name.'</a></li>';
        }
     }
    ?>          
    <li><a href="<?php echo site_url('probanner')?>" <?if(isset($this->madv)){echo 'class="select"';}?>>Quảng cáo</a></li>  
    <?
     if(isset($this->madv)) {
        for($i = 0; $i < count($this->madv); $i++){
            $link = $this->madv[$i]['link'];
            $name = $this->madv[$i]['name'];
            echo '<li class="sub-menu"><a href="'.base_url().$link.'">'.$name.'</a></li>';
        }
     }
    ?>     
</ul>